//
//  SSEmoticonPageViewCell.swift
//  SSSina
//
//  Created by ss on 2017/7/10.
//  Copyright © 2017年 ss. All rights reserved.
//

import UIKit

class SSEmoticonPageViewCell: UICollectionViewCell {
    
    
    var indexPath: IndexPath?{
        didSet{
            
            messageLabel.text = "第\(indexPath?.section ?? 0)组\n第\(indexPath?.item ?? 0)页"
        }
        
    }
    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    //MARK: - 设置视图
    private func setupUI(){
        backgroundColor = randomColor()
        
        contentView.addSubview(messageLabel)
        
        messageLabel.snp.makeConstraints { (make) in
            make.center.equalTo(contentView)
        }
    }
    
    
    //MARK: - 懒加载控件
    private lazy var messageLabel: UILabel = {
        let lab = UILabel()
        lab.textColor =  UIColor.black
        lab.font = UIFont.systemFont(ofSize: 32)
        lab.numberOfLines = 0
        return lab
    }()
}

